/*
 * @Author: i@rysa.cn
 * @Date: 2021-10-27 09:44:59
 * @LastEditTime: 2022-05-14 16:50:11
 * @LastEditors: i@rysa.cn
 * @Description:
 * @FilePath: \go-utils\strutil\arrary.go
 */

package strutil

import "strings"

/**
 * @name: 向字符串增加字符
 * @description:
 * @param {*} strs  使用dep隔开的字符串
 * @param {string} str 需要添加的字符串
 * @param {string} dep
 * @return {*}
 */
func JoinStringArr(strs, str string, dep string) string {
	if strs == "" {
		return str
	}
	arr := strings.Split(strs, dep)
	arr = append(arr, str)
	return strings.Join(arr, dep)
}
